3.1.95 \(\int (c+d x)^3 (a+a \sin (e+f x)) \, dx\) [95]

Optimal. Leaf size=90 \[ \frac {a (c+d x)^4}{4 d}+\frac {6 a d^2 (c+d x) \cos (e+f x)}{f^3}-\frac {a (c+d x)^3 \cos (e+f x)}{f}-\frac {6 a d^3 \sin (e+f x)}{f^4}+\frac {3 a d (c+d x)^2 \sin (e+f x)}{f^2} \]

[Out]

1/4*a*(d*x+c)^4/d+6*a*d^2*(d*x+c)*cos(f*x+e)/f^3-a*(d*x+c)^3*cos(f*x+e)/f-6*a*d^3*sin(f*x+e)/f^4+3*a*d*(d*x+c)
^2*sin(f*x+e)/f^2

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3398, 3377, 2717} \begin {gather*} \frac {6 a d^2 (c+d x) \cos (e+f x)}{f^3}+\frac {3 a d (c+d x)^2 \sin (e+f x)}{f^2}-\frac {a (c+d x)^3 \cos (e+f x)}{f}+\frac {a (c+d x)^4}{4 d}-\frac {6 a d^3 \sin (e+f x)}{f^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x)^3*(a + a*Sin[e + f*x]),x]

[Out]

(a*(c + d*x)^4)/(4*d) + (6*a*d^2*(c + d*x)*Cos[e + f*x])/f^3 - (a*(c + d*x)^3*Cos[e + f*x])/f - (6*a*d^3*Sin[e
 + f*x])/f^4 + (3*a*d*(c + d*x)^2*Sin[e + f*x])/f^2

Rule 2717

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3398

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 0] && (EqQ[n, 1] ||
IGtQ[m, 0] || NeQ[a^2 - b^2, 0])

Rubi steps

\begin {align*} \int (c+d x)^3 (a+a \sin (e+f x)) \, dx &=\int \left (a (c+d x)^3+a (c+d x)^3 \sin (e+f x)\right ) \, dx\\ &=\frac {a (c+d x)^4}{4 d}+a \int (c+d x)^3 \sin (e+f x) \, dx\\ &=\frac {a (c+d x)^4}{4 d}-\frac {a (c+d x)^3 \cos (e+f x)}{f}+\frac {(3 a d) \int (c+d x)^2 \cos (e+f x) \, dx}{f}\\ &=\frac {a (c+d x)^4}{4 d}-\frac {a (c+d x)^3 \cos (e+f x)}{f}+\frac {3 a d (c+d x)^2 \sin (e+f x)}{f^2}-\frac {\left (6 a d^2\right ) \int (c+d x) \sin (e+f x) \, dx}{f^2}\\ &=\frac {a (c+d x)^4}{4 d}+\frac {6 a d^2 (c+d x) \cos (e+f x)}{f^3}-\frac {a (c+d x)^3 \cos (e+f x)}{f}+\frac {3 a d (c+d x)^2 \sin (e+f x)}{f^2}-\frac {\left (6 a d^3\right ) \int \cos (e+f x) \, dx}{f^3}\\ &=\frac {a (c+d x)^4}{4 d}+\frac {6 a d^2 (c+d x) \cos (e+f x)}{f^3}-\frac {a (c+d x)^3 \cos (e+f x)}{f}-\frac {6 a d^3 \sin (e+f x)}{f^4}+\frac {3 a d (c+d x)^2 \sin (e+f x)}{f^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.31, size = 123, normalized size = 1.37 \begin {gather*} a \left (\frac {1}{4} x \left (4 c^3+6 c^2 d x+4 c d^2 x^2+d^3 x^3\right )-\frac {(c+d x) \left (c^2 f^2+2 c d f^2 x+d^2 \left (-6+f^2 x^2\right )\right ) \cos (e+f x)}{f^3}+\frac {3 d \left (c^2 f^2+2 c d f^2 x+d^2 \left (-2+f^2 x^2\right )\right ) \sin (e+f x)}{f^4}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)^3*(a + a*Sin[e + f*x]),x]

[Out]

a*((x*(4*c^3 + 6*c^2*d*x + 4*c*d^2*x^2 + d^3*x^3))/4 - ((c + d*x)*(c^2*f^2 + 2*c*d*f^2*x + d^2*(-6 + f^2*x^2))
*Cos[e + f*x])/f^3 + (3*d*(c^2*f^2 + 2*c*d*f^2*x + d^2*(-2 + f^2*x^2))*Sin[e + f*x])/f^4)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(481\) vs. \(2(88)=176\).
time = 0.08, size = 482, normalized size = 5.36

method result size
risch \(\frac {a \,d^{3} x^{4}}{4}+a \,d^{2} c \,x^{3}+\frac {3 a d \,c^{2} x^{2}}{2}+a \,c^{3} x +\frac {a \,c^{4}}{4 d}-\frac {a \left (d^{3} f^{2} x^{3}+3 c \,d^{2} f^{2} x^{2}+3 c^{2} d \,f^{2} x +c^{3} f^{2}-6 d^{3} x -6 c \,d^{2}\right ) \cos \left (f x +e \right )}{f^{3}}+\frac {3 a d \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}-2 d^{2}\right ) \sin \left (f x +e \right )}{f^{4}}\) \(153\)
norman \(\frac {\frac {\left (2 a \,c^{3} f^{2}-12 a c \,d^{2}\right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f^{3}}+\frac {a \left (c^{3} f^{3}-3 c^{2} d \,f^{2}+6 d^{3}\right ) x}{f^{3}}+\frac {a \,d^{2} \left (c f -d \right ) x^{3}}{f}+\frac {a \left (c^{3} f^{3}+3 c^{2} d \,f^{2}-6 d^{3}\right ) x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f^{3}}+\frac {a \,d^{2} \left (c f +d \right ) x^{3} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {a \,d^{3} x^{4}}{4}+\frac {a \,d^{3} x^{4} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4}+\frac {6 a \,d^{3} x^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f^{2}}+\frac {6 d a \left (c^{2} f^{2}-2 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f^{4}}+\frac {3 a c d \left (c f -2 d \right ) x^{2}}{2 f}+\frac {12 a c \,d^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f^{2}}+\frac {3 a c d \left (c f +2 d \right ) x^{2} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f}}{1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )}\) \(308\)
derivativedivides \(\frac {-a \,c^{3} \cos \left (f x +e \right )+\frac {3 a \,c^{2} d e \cos \left (f x +e \right )}{f}+\frac {3 a \,c^{2} d \left (\sin \left (f x +e \right )-\left (f x +e \right ) \cos \left (f x +e \right )\right )}{f}-\frac {3 a c \,d^{2} e^{2} \cos \left (f x +e \right )}{f^{2}}-\frac {6 a c \,d^{2} e \left (\sin \left (f x +e \right )-\left (f x +e \right ) \cos \left (f x +e \right )\right )}{f^{2}}+\frac {3 a c \,d^{2} \left (-\left (f x +e \right )^{2} \cos \left (f x +e \right )+2 \cos \left (f x +e \right )+2 \left (f x +e \right ) \sin \left (f x +e \right )\right )}{f^{2}}+\frac {a \,d^{3} e^{3} \cos \left (f x +e \right )}{f^{3}}+\frac {3 a \,d^{3} e^{2} \left (\sin \left (f x +e \right )-\left (f x +e \right ) \cos \left (f x +e \right )\right )}{f^{3}}-\frac {3 a \,d^{3} e \left (-\left (f x +e \right )^{2} \cos \left (f x +e \right )+2 \cos \left (f x +e \right )+2 \left (f x +e \right ) \sin \left (f x +e \right )\right )}{f^{3}}+\frac {a \,d^{3} \left (-\left (f x +e \right )^{3} \cos \left (f x +e \right )+3 \left (f x +e \right )^{2} \sin \left (f x +e \right )-6 \sin \left (f x +e \right )+6 \left (f x +e \right ) \cos \left (f x +e \right )\right )}{f^{3}}+a \,c^{3} \left (f x +e \right )-\frac {3 a \,c^{2} d e \left (f x +e \right )}{f}+\frac {3 a \,c^{2} d \left (f x +e \right )^{2}}{2 f}+\frac {3 a c \,d^{2} e^{2} \left (f x +e \right )}{f^{2}}-\frac {3 a c \,d^{2} e \left (f x +e \right )^{2}}{f^{2}}+\frac {a c \,d^{2} \left (f x +e \right )^{3}}{f^{2}}-\frac {a \,d^{3} e^{3} \left (f x +e \right )}{f^{3}}+\frac {3 a \,d^{3} e^{2} \left (f x +e \right )^{2}}{2 f^{3}}-\frac {a \,d^{3} e \left (f x +e \right )^{3}}{f^{3}}+\frac {a \,d^{3} \left (f x +e \right )^{4}}{4 f^{3}}}{f}\) \(482\)
default \(\frac {-a \,c^{3} \cos \left (f x +e \right )+\frac {3 a \,c^{2} d e \cos \left (f x +e \right )}{f}+\frac {3 a \,c^{2} d \left (\sin \left (f x +e \right )-\left (f x +e \right ) \cos \left (f x +e \right )\right )}{f}-\frac {3 a c \,d^{2} e^{2} \cos \left (f x +e \right )}{f^{2}}-\frac {6 a c \,d^{2} e \left (\sin \left (f x +e \right )-\left (f x +e \right ) \cos \left (f x +e \right )\right )}{f^{2}}+\frac {3 a c \,d^{2} \left (-\left (f x +e \right )^{2} \cos \left (f x +e \right )+2 \cos \left (f x +e \right )+2 \left (f x +e \right ) \sin \left (f x +e \right )\right )}{f^{2}}+\frac {a \,d^{3} e^{3} \cos \left (f x +e \right )}{f^{3}}+\frac {3 a \,d^{3} e^{2} \left (\sin \left (f x +e \right )-\left (f x +e \right ) \cos \left (f x +e \right )\right )}{f^{3}}-\frac {3 a \,d^{3} e \left (-\left (f x +e \right )^{2} \cos \left (f x +e \right )+2 \cos \left (f x +e \right )+2 \left (f x +e \right ) \sin \left (f x +e \right )\right )}{f^{3}}+\frac {a \,d^{3} \left (-\left (f x +e \right )^{3} \cos \left (f x +e \right )+3 \left (f x +e \right )^{2} \sin \left (f x +e \right )-6 \sin \left (f x +e \right )+6 \left (f x +e \right ) \cos \left (f x +e \right )\right )}{f^{3}}+a \,c^{3} \left (f x +e \right )-\frac {3 a \,c^{2} d e \left (f x +e \right )}{f}+\frac {3 a \,c^{2} d \left (f x +e \right )^{2}}{2 f}+\frac {3 a c \,d^{2} e^{2} \left (f x +e \right )}{f^{2}}-\frac {3 a c \,d^{2} e \left (f x +e \right )^{2}}{f^{2}}+\frac {a c \,d^{2} \left (f x +e \right )^{3}}{f^{2}}-\frac {a \,d^{3} e^{3} \left (f x +e \right )}{f^{3}}+\frac {3 a \,d^{3} e^{2} \left (f x +e \right )^{2}}{2 f^{3}}-\frac {a \,d^{3} e \left (f x +e \right )^{3}}{f^{3}}+\frac {a \,d^{3} \left (f x +e \right )^{4}}{4 f^{3}}}{f}\) \(482\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)^3*(a+a*sin(f*x+e)),x,method=_RETURNVERBOSE)

[Out]

1/f*(-a*c^3*cos(f*x+e)+3*a/f*c^2*d*e*cos(f*x+e)+3*a/f*c^2*d*(sin(f*x+e)-(f*x+e)*cos(f*x+e))-3*a/f^2*c*d^2*e^2*
cos(f*x+e)-6*a/f^2*c*d^2*e*(sin(f*x+e)-(f*x+e)*cos(f*x+e))+3*a/f^2*c*d^2*(-(f*x+e)^2*cos(f*x+e)+2*cos(f*x+e)+2
*(f*x+e)*sin(f*x+e))+a/f^3*d^3*e^3*cos(f*x+e)+3*a/f^3*d^3*e^2*(sin(f*x+e)-(f*x+e)*cos(f*x+e))-3*a/f^3*d^3*e*(-
(f*x+e)^2*cos(f*x+e)+2*cos(f*x+e)+2*(f*x+e)*sin(f*x+e))+a/f^3*d^3*(-(f*x+e)^3*cos(f*x+e)+3*(f*x+e)^2*sin(f*x+e
)-6*sin(f*x+e)+6*(f*x+e)*cos(f*x+e))+a*c^3*(f*x+e)-3*a/f*c^2*d*e*(f*x+e)+3/2*a/f*c^2*d*(f*x+e)^2+3*a/f^2*c*d^2
*e^2*(f*x+e)-3*a/f^2*c*d^2*e*(f*x+e)^2+a/f^2*c*d^2*(f*x+e)^3-a/f^3*d^3*e^3*(f*x+e)+3/2*a/f^3*d^3*e^2*(f*x+e)^2
-a/f^3*d^3*e*(f*x+e)^3+1/4*a/f^3*d^3*(f*x+e)^4)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 498 vs. \(2 (92) = 184\).
time = 0.31, size = 498, normalized size = 5.53 \begin {gather*} \frac {4 \, {\left (f x + e\right )} a c^{3} + \frac {{\left (f x + e\right )}^{4} a d^{3}}{f^{3}} + \frac {4 \, {\left (f x + e\right )}^{3} a c d^{2}}{f^{2}} + \frac {6 \, {\left (f x + e\right )}^{2} a c^{2} d}{f} - 4 \, a c^{3} \cos \left (f x + e\right ) - \frac {4 \, {\left (f x + e\right )}^{3} a d^{3} e}{f^{3}} - \frac {12 \, {\left (f x + e\right )}^{2} a c d^{2} e}{f^{2}} - \frac {12 \, {\left (f x + e\right )} a c^{2} d e}{f} + \frac {12 \, a c^{2} d \cos \left (f x + e\right ) e}{f} - \frac {12 \, {\left ({\left (f x + e\right )} \cos \left (f x + e\right ) - \sin \left (f x + e\right )\right )} a c^{2} d}{f} + \frac {6 \, {\left (f x + e\right )}^{2} a d^{3} e^{2}}{f^{3}} + \frac {12 \, {\left (f x + e\right )} a c d^{2} e^{2}}{f^{2}} - \frac {12 \, a c d^{2} \cos \left (f x + e\right ) e^{2}}{f^{2}} + \frac {24 \, {\left ({\left (f x + e\right )} \cos \left (f x + e\right ) - \sin \left (f x + e\right )\right )} a c d^{2} e}{f^{2}} - \frac {12 \, {\left ({\left ({\left (f x + e\right )}^{2} - 2\right )} \cos \left (f x + e\right ) - 2 \, {\left (f x + e\right )} \sin \left (f x + e\right )\right )} a c d^{2}}{f^{2}} - \frac {4 \, {\left (f x + e\right )} a d^{3} e^{3}}{f^{3}} + \frac {4 \, a d^{3} \cos \left (f x + e\right ) e^{3}}{f^{3}} - \frac {12 \, {\left ({\left (f x + e\right )} \cos \left (f x + e\right ) - \sin \left (f x + e\right )\right )} a d^{3} e^{2}}{f^{3}} + \frac {12 \, {\left ({\left ({\left (f x + e\right )}^{2} - 2\right )} \cos \left (f x + e\right ) - 2 \, {\left (f x + e\right )} \sin \left (f x + e\right )\right )} a d^{3} e}{f^{3}} - \frac {4 \, {\left ({\left ({\left (f x + e\right )}^{3} - 6 \, f x - 6 \, e\right )} \cos \left (f x + e\right ) - 3 \, {\left ({\left (f x + e\right )}^{2} - 2\right )} \sin \left (f x + e\right )\right )} a d^{3}}{f^{3}}}{4 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^3*(a+a*sin(f*x+e)),x, algorithm="maxima")

[Out]

1/4*(4*(f*x + e)*a*c^3 + (f*x + e)^4*a*d^3/f^3 + 4*(f*x + e)^3*a*c*d^2/f^2 + 6*(f*x + e)^2*a*c^2*d/f - 4*a*c^3
*cos(f*x + e) - 4*(f*x + e)^3*a*d^3*e/f^3 - 12*(f*x + e)^2*a*c*d^2*e/f^2 - 12*(f*x + e)*a*c^2*d*e/f + 12*a*c^2
*d*cos(f*x + e)*e/f - 12*((f*x + e)*cos(f*x + e) - sin(f*x + e))*a*c^2*d/f + 6*(f*x + e)^2*a*d^3*e^2/f^3 + 12*
(f*x + e)*a*c*d^2*e^2/f^2 - 12*a*c*d^2*cos(f*x + e)*e^2/f^2 + 24*((f*x + e)*cos(f*x + e) - sin(f*x + e))*a*c*d
^2*e/f^2 - 12*(((f*x + e)^2 - 2)*cos(f*x + e) - 2*(f*x + e)*sin(f*x + e))*a*c*d^2/f^2 - 4*(f*x + e)*a*d^3*e^3/
f^3 + 4*a*d^3*cos(f*x + e)*e^3/f^3 - 12*((f*x + e)*cos(f*x + e) - sin(f*x + e))*a*d^3*e^2/f^3 + 12*(((f*x + e)
^2 - 2)*cos(f*x + e) - 2*(f*x + e)*sin(f*x + e))*a*d^3*e/f^3 - 4*(((f*x + e)^3 - 6*f*x - 6*e)*cos(f*x + e) - 3
*((f*x + e)^2 - 2)*sin(f*x + e))*a*d^3/f^3)/f

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 170, normalized size = 1.89 \begin {gather*} \frac {a d^{3} f^{4} x^{4} + 4 \, a c d^{2} f^{4} x^{3} + 6 \, a c^{2} d f^{4} x^{2} + 4 \, a c^{3} f^{4} x - 4 \, {\left (a d^{3} f^{3} x^{3} + 3 \, a c d^{2} f^{3} x^{2} + a c^{3} f^{3} - 6 \, a c d^{2} f + 3 \, {\left (a c^{2} d f^{3} - 2 \, a d^{3} f\right )} x\right )} \cos \left (f x + e\right ) + 12 \, {\left (a d^{3} f^{2} x^{2} + 2 \, a c d^{2} f^{2} x + a c^{2} d f^{2} - 2 \, a d^{3}\right )} \sin \left (f x + e\right )}{4 \, f^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^3*(a+a*sin(f*x+e)),x, algorithm="fricas")

[Out]

1/4*(a*d^3*f^4*x^4 + 4*a*c*d^2*f^4*x^3 + 6*a*c^2*d*f^4*x^2 + 4*a*c^3*f^4*x - 4*(a*d^3*f^3*x^3 + 3*a*c*d^2*f^3*
x^2 + a*c^3*f^3 - 6*a*c*d^2*f + 3*(a*c^2*d*f^3 - 2*a*d^3*f)*x)*cos(f*x + e) + 12*(a*d^3*f^2*x^2 + 2*a*c*d^2*f^
2*x + a*c^2*d*f^2 - 2*a*d^3)*sin(f*x + e))/f^4

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 264 vs. \(2 (88) = 176\).
time = 0.25, size = 264, normalized size = 2.93 \begin {gather*} \begin {cases} a c^{3} x - \frac {a c^{3} \cos {\left (e + f x \right )}}{f} + \frac {3 a c^{2} d x^{2}}{2} - \frac {3 a c^{2} d x \cos {\left (e + f x \right )}}{f} + \frac {3 a c^{2} d \sin {\left (e + f x \right )}}{f^{2}} + a c d^{2} x^{3} - \frac {3 a c d^{2} x^{2} \cos {\left (e + f x \right )}}{f} + \frac {6 a c d^{2} x \sin {\left (e + f x \right )}}{f^{2}} + \frac {6 a c d^{2} \cos {\left (e + f x \right )}}{f^{3}} + \frac {a d^{3} x^{4}}{4} - \frac {a d^{3} x^{3} \cos {\left (e + f x \right )}}{f} + \frac {3 a d^{3} x^{2} \sin {\left (e + f x \right )}}{f^{2}} + \frac {6 a d^{3} x \cos {\left (e + f x \right )}}{f^{3}} - \frac {6 a d^{3} \sin {\left (e + f x \right )}}{f^{4}} & \text {for}\: f \neq 0 \\\left (a \sin {\left (e \right )} + a\right ) \left (c^{3} x + \frac {3 c^{2} d x^{2}}{2} + c d^{2} x^{3} + \frac {d^{3} x^{4}}{4}\right ) & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)**3*(a+a*sin(f*x+e)),x)

[Out]

Piecewise((a*c**3*x - a*c**3*cos(e + f*x)/f + 3*a*c**2*d*x**2/2 - 3*a*c**2*d*x*cos(e + f*x)/f + 3*a*c**2*d*sin
(e + f*x)/f**2 + a*c*d**2*x**3 - 3*a*c*d**2*x**2*cos(e + f*x)/f + 6*a*c*d**2*x*sin(e + f*x)/f**2 + 6*a*c*d**2*
cos(e + f*x)/f**3 + a*d**3*x**4/4 - a*d**3*x**3*cos(e + f*x)/f + 3*a*d**3*x**2*sin(e + f*x)/f**2 + 6*a*d**3*x*
cos(e + f*x)/f**3 - 6*a*d**3*sin(e + f*x)/f**4, Ne(f, 0)), ((a*sin(e) + a)*(c**3*x + 3*c**2*d*x**2/2 + c*d**2*
x**3 + d**3*x**4/4), True))

________________________________________________________________________________________

Giac [A]
time = 2.35, size = 157, normalized size = 1.74 \begin {gather*} \frac {1}{4} \, a d^{3} x^{4} + a c d^{2} x^{3} + \frac {3}{2} \, a c^{2} d x^{2} + a c^{3} x - \frac {{\left (a d^{3} f^{3} x^{3} + 3 \, a c d^{2} f^{3} x^{2} + 3 \, a c^{2} d f^{3} x + a c^{3} f^{3} - 6 \, a d^{3} f x - 6 \, a c d^{2} f\right )} \cos \left (f x + e\right )}{f^{4}} + \frac {3 \, {\left (a d^{3} f^{2} x^{2} + 2 \, a c d^{2} f^{2} x + a c^{2} d f^{2} - 2 \, a d^{3}\right )} \sin \left (f x + e\right )}{f^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^3*(a+a*sin(f*x+e)),x, algorithm="giac")

[Out]

1/4*a*d^3*x^4 + a*c*d^2*x^3 + 3/2*a*c^2*d*x^2 + a*c^3*x - (a*d^3*f^3*x^3 + 3*a*c*d^2*f^3*x^2 + 3*a*c^2*d*f^3*x
 + a*c^3*f^3 - 6*a*d^3*f*x - 6*a*c*d^2*f)*cos(f*x + e)/f^4 + 3*(a*d^3*f^2*x^2 + 2*a*c*d^2*f^2*x + a*c^2*d*f^2
- 2*a*d^3)*sin(f*x + e)/f^4

________________________________________________________________________________________

Mupad [B]
time = 0.26, size = 191, normalized size = 2.12 \begin {gather*} \frac {a\,d^3\,x^4}{4}-\frac {3\,\sin \left (e+f\,x\right )\,\left (2\,a\,d^3-a\,c^2\,d\,f^2\right )}{f^4}-\frac {\cos \left (e+f\,x\right )\,\left (a\,c^3\,f^2-6\,a\,c\,d^2\right )}{f^3}+a\,c^3\,x+\frac {3\,x\,\cos \left (e+f\,x\right )\,\left (2\,a\,d^3-a\,c^2\,d\,f^2\right )}{f^3}+\frac {3\,a\,c^2\,d\,x^2}{2}+a\,c\,d^2\,x^3-\frac {a\,d^3\,x^3\,\cos \left (e+f\,x\right )}{f}+\frac {3\,a\,d^3\,x^2\,\sin \left (e+f\,x\right )}{f^2}+\frac {6\,a\,c\,d^2\,x\,\sin \left (e+f\,x\right )}{f^2}-\frac {3\,a\,c\,d^2\,x^2\,\cos \left (e+f\,x\right )}{f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*sin(e + f*x))*(c + d*x)^3,x)

[Out]

(a*d^3*x^4)/4 - (3*sin(e + f*x)*(2*a*d^3 - a*c^2*d*f^2))/f^4 - (cos(e + f*x)*(a*c^3*f^2 - 6*a*c*d^2))/f^3 + a*
c^3*x + (3*x*cos(e + f*x)*(2*a*d^3 - a*c^2*d*f^2))/f^3 + (3*a*c^2*d*x^2)/2 + a*c*d^2*x^3 - (a*d^3*x^3*cos(e +
f*x))/f + (3*a*d^3*x^2*sin(e + f*x))/f^2 + (6*a*c*d^2*x*sin(e + f*x))/f^2 - (3*a*c*d^2*x^2*cos(e + f*x))/f

________________________________________________________________________________________